# -*- coding: utf-8 -*-
"""
-------------------------------------------------
Project Name: luffcity study project
File Name: client.py
Author: kij
Create Date: 2021/3/23
-------------------------------------------------
"""
import socket
import send


def run():
	"""
	链接服务器
	:return:
	"""
	conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
	conn.connect(send.IP_POST)
	hint = '请输入>>>  '
	while True:
		try:
			input_msg = input(hint)
			if input_msg.upper() == 'Q':
				break
			send.send_data(conn, input_msg)
			send.recv_data(conn)
		except KeyboardInterrupt as e:
			print(".", e)
run()